/**
 * This is an abstract class and represents data common to a Customer or
 * Employee of Proctor&Gamble.
 */
public abstract class User {

    private int userId;
    private String name;
    private String emailAddress;

    /**
     * Default constructor
     */
    public User() {
        this(-1, "", "");
    }

    /**
     * More detailed constructor: sets userId, name, and email on creation
     *
     * @param userId
     * @param name
     * @param emailAddress
     */
    public User(int userId, String name, String emailAddress) {
        this.userId = userId;
        this.name = name;
        this.emailAddress = emailAddress;
    }


    /**
     * @return Returns the user id
     */
    public int getUserId() {
        return userId;
    }

    /**
     * Sets the user id
     *
     * @param val The user id
     */
    public void setUserId(int val) {
        this.userId = val;
    }

    /**
     * @return Returns the name of the user
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the name of the user
     *
     * @param val The name of the user
     */
    public void setName(String val) {
        this.name = val;
    }

    /**
     * @return Returns the email address of the user
     */
    public String getEmailAddress() {
        return emailAddress;
    }

    /**
     * Sets the email address of the user
     *
     * @param val The email address of the user
     */
    public void setEmailAddress(String val) {
        this.emailAddress = val;
    }

}
